import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;

/**
 * @Question t1
 * @Date 2023/2/9 20:34
 * @Solution
 */
public class t1 {
    public static void main(String[] args) throws ParseException {
        Scanner scanner = new Scanner(System.in);
        long ms= scanner.nextLong();
        DateFormat dateFormat1 = new SimpleDateFormat("HH:mm:ss");
        DateFormat dateFormat2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Date myDate2 = dateFormat2.parse("1970-1-1 00:00:00");
        Date a = new Date(myDate2.getTime()+ms);
        String res = dateFormat2.format(a);
        res=res.substring(res.length()-8,res.length());
        System.out.println(res);
    }
}
